package com.beetle123.model;

import java.util.ArrayList;
import java.util.List;

/**
 * @author yuanlong.chen
 * @date 2021/09/06
 */
public class ServiceModel {
    private String version;
    private String group;
    private String name;
    private String uniqueKey;
    private List<MethodModel> methodList;
    private List<String> methodNameList = new ArrayList<>();

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<MethodModel> getMethodList() {
        return methodList;
    }

    public void setMethodList(List<MethodModel> methodList) {
        this.methodList = methodList;
    }

    public void addMethod(MethodModel method) {
        if (this.methodList == null) {
            this.methodList = new ArrayList<>(16);
        }
        this.methodList.add(method);
        this.methodNameList.add(method.getName());
    }

    public String getUniqueKey() {
        return uniqueKey;
    }

    public void setUniqueKey(String uniqueKey) {
        this.uniqueKey = uniqueKey;
    }

    public List<String> getMethodNameList() {
        return methodNameList;
    }

    public void setMethodNameList(List<String> methodNameList) {
        this.methodNameList = methodNameList;
    }
}
